<template>
	<view>
		<view style="height: 1rpx;width: 1rpx;"></view>
		<view class="booking-each" v-for="(i,index) in itemList">
			<view class="each-name">
				<view class="name">店铺名·24H自助台球(红旗路店)</view>
				<view class="state"> <image src="../../static/index/mobile.png" mode=""></image> </view>
			</view>
			<view class="explain-text">桌      台：台球桌 6号桌</view>
			<view class="explain-text">预定时间：2024-04-02 15:00:00</view>
			<view class="explain-text">店铺位置：郑州市金水区经八路街道广厦·城市之巅</view>
			<view class="wire z-margin-tb-24"></view>
			<view class="duration"> 
			    <view class="duration-l"> <text>￥30</text></view> 
			</view>
		</view>
		<u-loadmore :status="status" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				itemList:10,
				page:1,
				status: 'loadmore',
				flag: false,
			}
		},
		onReachBottom() {
			//避免多次触发
			if (this.status == 'loading' || this.status == 'nomore') {
				return;
			}
			this.status = 'loading';
			this.getList()
		},
		methods: {
			getList(){
				this.flag = false
				this.status = 'loading';
				setTimeout(()=>{
					// this.itemList = this.itemList.concat(res.data);
					if (this.itemList == 30) {
						this.status = 'nomore';
					} else {
						this.itemList += 10
						this.status = 'loadmore';
					}
					this.flag = true
					uni.stopPullDownRefresh();
				},1000)
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F7F8FA;
	}
	.booking-each {
		width: 622rpx;
		padding: 32rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		margin: auto;
		margin-top: 24rpx;
		
		.each-name {
			display: flex;
			justify-content: space-between;
			.name {
				font-weight: bold;
				font-size: 26rpx;
				color: #1C274C;
				padding-bottom: 12rpx;
			}
			.state {
				image {
					width: 40rpx;
					height: 40rpx;
				}
			}
		}
		.explain-text {
			font-weight: 500;
			font-size: 24rpx;
			color: #6B738B;
			margin-top: 16rpx;
		}
		.wire {
			width: 686rpx;
			height: 1rpx;
			background-color: #f2f3f5;
		}
		.duration {
			display: flex;
			justify-content: space-between;
			align-items: center;
			.duration-l {
				font-weight: bold;
				font-size: 28rpx;
				color: #1C274C;
				text {
					color: #FF7B18;
				}
			}
		}
	}
</style>
